package com.yonyou.gmcc.gateway.wechat.service.interfaces;


import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.yonyou.gmcc.gateway.wechat.common.ApiVersionConsts;

@FeignClient(name="service-wechat-push" )
public interface WechatApiServiceInterface {

	@RequestMapping(value = ApiVersionConsts.BASE_PATH+"/"+ApiVersionConsts.VERSION+"/wechatApiService"+"/getOpenid/{code}", method = RequestMethod.GET,consumes = "application/json;UTF-8")
	String getOpenidByCode(@PathVariable("code") String code) ;
	
	@RequestMapping(value = ApiVersionConsts.BASE_PATH+"/"+ApiVersionConsts.VERSION+"/wechatApiService"+"/getToken", method = RequestMethod.GET,consumes = "application/json;UTF-8")
	String getToken() ;
	
	@RequestMapping(value = "/wechat-push/api/v1/userId", method = RequestMethod.GET,consumes = "application/json;UTF-8")
	String selectUserIdByOpenId(@RequestParam("openid") String openid);
}
